package com.lemeng.service.impl;

import com.lemeng.service.AdService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Init implements InitializingBean {
    @Autowired
    AdService adService;

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("缓存预热开始");
        adService.selectAdRedis();
        System.out.println("缓存预热结束");

    }
}
